<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    html {
      font-size: calc(100vw / 10);
    }

    .divxx {
      width: 10rem;
      height: 1rem;
      background-color: red;
      line-height: 1rem;
    }
  </style>
</head>

<body>
  <div class="divxx">
    <div>
      哈哈哈测试
    </div>
  </div>
  <input type="text" maxlength="11">
</body>
<script>

</script>

</html>